package javaClassExercise.arrays;

import org.junit.Test;

import java.util.Arrays;

/**
 * Created by lomo on 2017/3/18.
 */
public class arraySortStudy {

    @Test
    public void intDataSort() {
        int[] data = {1,0,99,10,33,67,88,91,9,7,45,12};

        Arrays.sort(data);

        for (int i : data) {
            System.out.println(i);
        }
    }
    //0 1  7 9 10 12 33 45 67 88 91 99


    @Test
    public void charDataSort() {
        char[] data = {'A', 'g', 'c', 'D', 'C', 'f', 'F', 'Y'};
        Arrays.sort(data);

        for (char s : data) {
            System.out.println(s);
        }
    }

    // A C D F Y c f g
}
